package com.xzl.xep.pojo;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.NotBlank;


@Entity
@Table(name="dp_customer")
public class Customer extends IdEntity {

	@NotNull
	private Long companyId;
	
	private String companyName;
	
	@NotBlank
	private String cardno;
	
	
	private String name;
	

	private String mobile;
	
	private Integer sex;
	
	@NotNull	
	private Double balance;
	
	@NotNull
	private Double totalCredit;
	
	@NotNull
	private Double totalSpend;
	
	@Temporal(TemporalType.TIMESTAMP)
	private Date lastSpendTime;
	
	@Temporal(TemporalType.TIMESTAMP)
	private Date lastCreditTime;
	
	@NotNull
	private Long operatorId;
	
	@NotBlank
	private String operatorName;

	public String getCardno() {
		return cardno;
	}

	public void setCardno(String cardno) {
		this.cardno = cardno;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public Integer getSex() {
		return sex;
	}

	public void setSex(Integer sex) {
		this.sex = sex;
	}

	public Double getBalance() {
		return balance;
	}

	public void setBalance(Double balance) {
		this.balance = balance;
	}
	

	public Double getTotalCredit() {
		return totalCredit;
	}

	public void setTotalCredit(Double totalCredit) {
		this.totalCredit = totalCredit;
	}

	public Double getTotalSpend() {
		return totalSpend;
	}

	public void setTotalSpend(Double totalSpend) {
		this.totalSpend = totalSpend;
	}

	public Date getLastSpendTime() {
		return lastSpendTime;
	}

	public void setLastSpendTime(Date lastSpendTime) {
		this.lastSpendTime = lastSpendTime;
	}

	public Date getLastCreditTime() {
		return lastCreditTime;
	}

	public void setLastCreditTime(Date lastCreditTime) {
		this.lastCreditTime = lastCreditTime;
	}

	public Long getCompanyId() {
		return companyId;
	}

	public void setCompanyId(Long companyId) {
		this.companyId = companyId;
	}

	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public Long getOperatorId() {
		return operatorId;
	}

	public void setOperatorId(Long id) {
		this.operatorId = id;
	}

	public String getOperatorName() {
		return operatorName;
	}

	public void setOperatorName(String operatorName) {
		this.operatorName = operatorName;
	}
	
	
	
}
